(function() {
    'use strict';

    angular
        .module('byibserverApp')
        .controller('MildCaseDetailController', MildCaseDetailController);

    MildCaseDetailController.$inject = ['$scope', '$rootScope', '$stateParams', 'previousState', 'entity', 'MildCase', 'Product'];

    function MildCaseDetailController($scope, $rootScope, $stateParams, previousState, entity, MildCase, Product) {
        var vm = this;

        vm.mildCase = entity;
        vm.previousState = previousState.name;

        var unsubscribe = $rootScope.$on('byibserverApp:mildCaseUpdate', function(event, result) {
            vm.mildCase = result;
        });
        $scope.$on('$destroy', unsubscribe);
    }
})();
